
##Create Admin User
admin = User.create(:handle=>'admin',
:first_name=>'Super',
:last_name=>'Admin',
:password=>"qazwsx", :password_confirmation=>"qazwsx", 
:email=>"jpereira.pmp@gmail.com", :accept=>"1", :active=>true, :admin=>true)
admin.admin = true
admin.active = true
admin.save
admin.handle="admin"
admin.save

admin_user_id = User.find_by_handle("admin").id

#Create Default FAQ Page
default_campaign_faq_page = Page.new
default_campaign_faq_page.breadcrumb = "Campaign FAQ"
default_campaign_faq_page.title = "Campaign FAQ"
default_campaign_faq_page.is_home = false
default_campaign_faq_page.permalink = "default_campaign_faq"
default_campaign_faq_page.content = "The default FAQ Page"
default_campaign_faq_page.save!


#Create Default Winner Mail template
default_campaign_winner_template_page = Page.new
default_campaign_winner_template_page.breadcrumb = "Winner email"
default_campaign_winner_template_page.title = "Winner email template"
default_campaign_winner_template_page.is_home = false
default_campaign_winner_template_page.permalink = "default_winner_template_page"
default_campaign_winner_template_page.content = "Winner email template"
default_campaign_winner_template_page.save!


#Create Default Rules Page
default_campaign_rules_page = Page.new
default_campaign_rules_page.breadcrumb = "Campaign Rules"
default_campaign_rules_page.title = "Campaign Rules"
default_campaign_rules_page.is_home = false
default_campaign_rules_page.permalink = "default_campaign_rules"
default_campaign_rules_page.content = "The default Rules Page"
default_campaign_rules_page.save!


#Create Default privacy Page
default_campaign_privacy_page = Page.new
default_campaign_privacy_page.breadcrumb = "Campaign Privacy"
default_campaign_privacy_page.title = "Campaign Privacy"
default_campaign_privacy_page.is_home = false
default_campaign_privacy_page.permalink = "default_campaign_privacy"
default_campaign_privacy_page.content = "The default Privacy Page"
default_campaign_privacy_page.save!


#Create Default TOS Page
default_campaign_tos_page = Page.new
default_campaign_tos_page.breadcrumb = "Campaign TOS"
default_campaign_tos_page.title = "Campaign TOS"
default_campaign_tos_page.is_home = false
default_campaign_tos_page.permalink = "default_campaign_tos"
default_campaign_tos_page.content = "The default TOS Page"
default_campaign_tos_page.save!





default_campaign = Campaign.new
default_campaign.name = "Default Campaign"
default_campaign.description = "The default campaigns"
default_campaign.instructions_to_participate = "The default campaign Participate instructions"
default_campaign.instructions_to_win = "The default campaign win instructions"
default_campaign.campaign_faq_page_id= default_campaign_faq_page.id
default_campaign.campaign_rules_page_id= default_campaign_rules_page.id
default_campaign.campaign_privacy_page_id= default_campaign_privacy_page.id
default_campaign.campaign_tos_page_id= default_campaign_tos_page.id
default_campaign.campaign_winner_mail_page_template_id= default_campaign_winner_template_page.id
default_campaign.prize = "prize"

#Points
default_campaign.points_submit_content= 10
default_campaign.points_vote_content= 3
default_campaign.points_comment_content= 5 
default_campaign.points_invite_friends= 30

default_campaign.owner_id = admin_user_id
default_campaign.start_date = 10.days.ago
default_campaign.end_date = 100.days.from_now
default_campaign.is_default=true
default_campaign.save!


top_menu = Menu.new 
top_menu.name = "top_menu"
top_menu.save!

footer_menu = Menu.new 
footer_menu.name = "footer"
footer_menu.save!

main_menu = Menu.new 
main_menu.name = "main"
main_menu.save!

analitycs_tracking_code = SiteConfiguration.new
analitycs_tracking_code.prop_name = "analitycs_tracking_code"
analitycs_tracking_code.string_property_value="UA-2473783-3"
analitycs_tracking_code.save!

